]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
keyboard: destroy actors when a group is removed
authorDaiki Ueno <ueno@unixuser.org>
Wed, 20 Feb 2013 10:10:29 +0000 (19:10 +0900)
committerDaiki Ueno <ueno@unixuser.org>
Wed, 20 Feb 2013 13:39:41 +0000 (22:39 +0900)
We can't reuse key actors since signals connected to them are
associated to the original group object.
Fix of commit 824fbe09c2a4f59b009a3dd57d40ec752c2efc89.

https://bugzilla.gnome.org/show_bug.cgi?id=681735

js/ui/keyboard.js

index 615ba7b4704aa0f58d2c27361d52211b21a82e39..3201249d920beaf1969228bc8a78ff4a7eda9893 100644 (file)
@@ -412,13 +412,11 @@ const Keyboard = new Lang.Class({
     },
 
     _onGroupAdded: function (keyboard, gname) {
-        if (!(gname in this._groups))
-            this._groups[gname] = this._createLayersForGroup(gname);
+        this._groups[gname] = this._createLayersForGroup(gname);
     },
 
     _onGroupRemoved: function (keyboard, gname) {
-        // Since _createLayersForGroup is costly, don't remove the
-        // actors from _groups, so they can be reused.
+        delete this._groups[gname];
     },
 
     _setActiveLayer: function () {